package cn.schoolwow.ams.module.block.listBlock.common.flow;

import cn.schoolwow.ams.domain.block.list.common.AMSFieldOption;
import cn.schoolwow.ams.domain.option.QuickAMSOption;
import cn.schoolwow.quickflow.domain.FlowContext;
import cn.schoolwow.quickflow.flow.BusinessFlow;

public class HandleAPIFieldListenerCommonFlow implements BusinessFlow {
    @Override
    public void executeBusinessFlow(FlowContext flowContext) throws Exception {
        QuickAMSOption quickAMSOption = flowContext.checkInstanceData(QuickAMSOption.class);

        if(null==quickAMSOption.amsFieldListener){
            return;
        }
        AMSFieldOption amsFieldOption = flowContext.checkInstanceData(AMSFieldOption.class);
        quickAMSOption.amsFieldListener.handleAMSField(amsFieldOption);
    }

    @Override
    public String name() {
        return "处理AMSFieldListener监听器";
    }

}
